package demo1接口的使用;

public class Test {
    public static void test1(Animal animal){
        animal.etc();
    }
    public static void test2(ISwimming iSwimming){
        iSwimming.swim();
    }
    public static void test3(IFlying iFlying){
        iFlying.fly();
    }
    public static void tset4(IRunning iRunning){
        iRunning.run();
    }

    public static void main(String[] args) {
        Brid brid = new Brid("小鸟",10);
        Dog dog = new Dog("小狗",12);
        test1(brid);
        test2(dog);
    }
}
